import request from '@/utils/request'

export function loginAPI(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}

export function getUserInfoAPI() {
  return request({
    url: '/sys/profile',
    method: 'get'
  })
}
// 设置用户信息
export function setUserInfoAPI(data) {
  return request({
    url: '/sys/profile',
    method: 'put',
    data
  })
}

export function logoutAPI() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

// 修改密码
export function updatePasswordAPI(data) {
  return request({
    url: '/sys/user/updatePass',
    method: 'put',
    data
  })
}
